package com.company;

import java.util.Scanner;

public class Main {

    public static void main(String[] args) {
        Scanner scanner = new Scanner(System.in);
        System.out.print("请输入第一个数字");
        float a = scanner.nextInt();
        System.out.print("请输入第二个数字");
        float b = scanner.nextInt();
        System.out.print("请选择操作");
        System.out.print("0:加 1:减 2:乘 3:除");
        int j = scanner.nextInt();
        float s;
        switch (j) {
            case 0:
               s=a+b; System.out.println(a+"+"+b+"="+s);
                break;
            case 1:
               s=a-b; System.out.println(a+"-"+b+"="+s);
                break;
            case 2:
               s=a*b; System.out.println(a+"*"+b+"="+s);
                break;
            case 3:
               s=a/b; System.out.println(a+"/"+b+"="+s);
                break;
        }

    }
}
